import { RouteRecordRaw } from 'vue-router';
import { Layout } from '@/router/constant';
import { AlertFilled } from '@vicons/antd';
import { renderIcon } from '@/utils/index';

const routeName = 'data';

const routes: Array<RouteRecordRaw> = [
  {
    path: `/${routeName}`,
    name: routeName,
    redirect: `/${routeName}/index`,
    component: Layout,
    meta: {
      title: '数据监测',
      sort: 1,
    },
    children: [
      {
        path: 'index',
        name: `${routeName}_index_1`,
        meta: {
          title: '测试页面1',
          icon: renderIcon(AlertFilled),
        },
        component: () => import('@/views/test/index.vue'),
      },
      {
        path: 'index_2',
        name: `${routeName}_index_2`,
        meta: {
          title: '测试页面2',
          icon: renderIcon(AlertFilled),
        },
        component: () => import('@/views/test/index.vue'),
      }, 
      {
        path: 'index_3',
        name: `${routeName}_index_3`,
        meta: {
          title: '全局变量管理',
          icon: renderIcon(AlertFilled),
        },
        component: () => import('@/views/GlobalVarMgt/index.vue'),
      },
      // {
      //   path: 'index_33',
      //   name: `${routeName}_index_33`,
      //   meta: {
      //     title: '全局变量管理1',
      //     icon: renderIcon(AlertFilled),
      //   },
      //   component: () => import('@/views/pointsVariable/index.vue'),
      // },
      // {
      //   path: 'index_4',
      //   name: `${routeName}_index_4`,
      //   meta: {
      //     title: '资产变量列表',
      //     icon: renderIcon(AlertFilled),
      //   },
      //   component: () => import('@/views/AssVarList/index.vue'),
      // },

      // {
      //   path: 'index_5',
      //   name: `${routeName}_index_5`,
      //   meta: {
      //     title: '门禁变量列表',
      //     icon: renderIcon(AlertFilled),
      //   },
      //   component: () => import('@/views/AccVarList/index.vue'),
      // },
    ],
  },
];

export default routes;
